package cn.nnxy.purchaseshop.controller;

import cn.nnxy.purchaseshop.service.impl.GoodsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * 作者：李怀聪
 * 时间: 2021/6/4
 * 作用：商品信息控制类
 */

@Controller
@RequestMapping("goods")
public class GoodsContorller {
    @Autowired
    GoodsServiceImpl goodsService;

    @RequestMapping("main")
    public String main(){
        return "index";
    }


    @RequestMapping("snapup")
    public String snapUp(HttpSession session){
//        List<CgGoods> snapUp = goodsService.findByState(3); //获取前五条限时抢商品
//        session.setAttribute("goods" , snapUp);
        return "goodsDetails";
    }




}
